<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
	</body>
	<script type="text/javascript">
		function ajax() {
			var xhr = new XMLHttpRequest();
			xhr.onreadystatechange = function() {
				if (xhr.readyState == 4) {
//					console.log(xhr.responseText)
					console.log(JSON.parse(xhr.responseText))
				}
			}
//			跨域处理,做一个反向代理
			xhr.open("GET", "http://localhost/toutiao/index?type=caijing&key=c14887fe64c3c92f7cd9507b34e01257")
			xhr.send()
		}

		ajax()
		
	</script>

</html>